home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / programr / atre27.exe / ATREE_27 / INCLUDE / BV.H < prev   
C/C++ Source or Header  |  1992-08-01  |  5KB  |  93 lines

  1. /*****************************************************************************
  2.  ****                                                                     ****
  3.  **** bv.h                                                                ****
  4.  ****                                                                     ****
  5.  **** atree release 2.7                                                   ****
  6.  **** Adaptive Logic Network (ALN) simulation library.                       ****
  7.  **** Copyright (C) A. Dwelly, R. Manderscheid, M. Thomas, W.W. Armstrong ****
  8.  ****               1991, 1992                                            ****
  9.  ****                                                                     ****
  10.  **** License:                                                            ****
  11.  **** A royalty-free license is granted for the use of this software for  ****
  12.  **** NON_COMMERCIAL PURPOSES ONLY. The software may be copied and/or     ****
  13.  **** modified provided this notice appears in its entirety and unchanged ****
  14.  **** in all derived source programs.  Persons modifying the code are     ****
  15.  **** requested to state the date, the changes made and who made them     ****
  16.  **** in the modification history.                                        ****
  17.  ****                                                                     ****
  18.  **** Patent License:                                                     ****
  19.  **** The use of a digital circuit which transmits a signal indicating    ****
  20.  **** heuristic responsibility is protected by U. S. Patent 3,934,231     ****
  21.  **** and others assigned to Dendronic Decisions Limited of Edmonton,     ****
  22.  **** W. W. Armstrong, President.  A royalty-free license is granted      ****
  23.  **** by the company to use this patent for NON_COMMERCIAL PURPOSES ONLY  ****
  24.  **** to adapt logic trees using this program and its modifications.      ****
  25.  ****                                                                     ****
  26.  **** Limited Warranty:                                                   ****
  27.  **** This software is provided "as is" without warranty of any kind,     ****
  28.  **** either expressed or implied, including, but not limited to, the     ****
  29.  **** implied warrantees of merchantability and fitness for a particular  ****
  30.  **** purpose.  The entire risk as to the quality and performance of the  ****
  31.  **** program is with the user.  Neither the authors, nor the             ****
  32.  **** University of Alberta, its officers, agents, servants or employees  ****
  33.  **** shall be liable or responsible in any way for any damage to         ****
  34.  **** property or direct personal or consequential injury of any nature   ****
  35.  **** whatsoever that may be suffered or sustained by any licensee, user  ****
  36.  **** or any other party as a consequence of the use or disposition of    ****
  37.  **** this software.                                                      ****
  38.  ****                                                                     ****
  39.  **** Modification history:                                               ****
  40.  ****                                                                     ****
  41.  **** 90.05.09 Initial implementation, A.Dwelly                           ****
  42.  **** 91.07.15 Release 2, Rolf Manderscheid                               ****
  43.  **** 92.27.02 Release 2.5 Monroe Thomas                                  ****
  44.  **** 92.03.07 Release 2.6, Monroe Thomas                                 ****
  45.  **** 92.01.08 Release 2.7, Monroe Thomas                                 ****
  46.  ****                                                                     ****
  47.  *****************************************************************************/
  48.  
  49. /*****************************************************************************
  50.  ****                                                                     ****
  51.  **** bit_vec                                                             ****
  52.  ****                                                                     ****
  53.  **** A bit_vec is a packed vector of bits, stored in an array of chars.  ****
  54.  *****************************************************************************/
  55.  
  56. #ifndef __BV_H
  57. #define __BV_H
  58.  
  59. #ifndef __WINDOWS_H
  60. #include <windows.h>
  61. #endif
  62.  
  63. #ifdef __cplusplus
  64. extern "C" {
  65. #endif  // __cplusplus
  66.  
  67. typedef struct bit_vec_strc
  68. {
  69.     int len;    /* The length of the vector in bits */
  70.     LPSTR bv;
  71. }
  72. bit_vec;                                // struct is 6 bytes long
  73.  
  74. typedef bit_vec far *LPBIT_VEC;         // common Windows convention
  75.  
  76. /* Public function prototypes */
  77.  
  78. int FAR PASCAL          bv_diff(LPBIT_VEC, LPBIT_VEC);
  79. LPBIT_VEC FAR PASCAL    bv_create(int);
  80. LPBIT_VEC FAR PASCAL    bv_pack(LPSTR, int);
  81. LPBIT_VEC FAR PASCAL    bv_concat(int, LPBIT_VEC FAR *);
  82. LPBIT_VEC FAR PASCAL    bv_copy(LPBIT_VEC);
  83. void FAR PASCAL         bv_set(int,LPBIT_VEC,BOOL);
  84. BOOL FAR PASCAL         bv_extract(int,LPBIT_VEC);
  85. BOOL FAR PASCAL         bv_equal(LPBIT_VEC, LPBIT_VEC);
  86. void FAR PASCAL         bv_free(LPBIT_VEC);
  87. int FAR PASCAL          bv_print(FILE *, LPBIT_VEC);
  88.  
  89. #ifdef __cplusplus
  90. }
  91. #endif  // __cplusplus
  92.  
  93. #endif    // __BV_H